<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"       xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/resources/templates/template_site.xhtml">
        
        <ui:define name="content">
            
             
                <p:panel header="#{bundle.EditPhotosTitle}" >
                <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
                <p:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditPhotosLabel_idphoto}" for="idphoto" />
                    <p:inputText id="idphoto" value="#{photosController.selected.idphoto}" title="#{bundle.EditPhotosTitle_idphoto}" required="true" requiredMessage="#{bundle.EditPhotosRequiredMessage_idphoto}"/>
                    <h:outputLabel value="#{bundle.EditPhotosLabel_photopath}" for="photopath" />
                    <p:inputText id="photopath" value="#{photosController.selected.photopath}" title="#{bundle.EditPhotosTitle_photopath}" required="true" requiredMessage="#{bundle.EditPhotosRequiredMessage_photopath}"/>
                    <h:outputLabel value="#{bundle.EditPhotosLabel_filename}" for="filename" />
                    <p:inputText id="filename" value="#{photosController.selected.filename}" title="#{bundle.EditPhotosTitle_filename}" />
                    <h:outputLabel value="#{bundle.EditPhotosLabel_iditem}" for="iditem" />
                    <p:selectOneMenu id="iditem" value="#{photosController.selected.iditem}" title="#{bundle.EditPhotosTitle_iditem}" required="true" requiredMessage="#{bundle.EditPhotosRequiredMessage_iditem}">
                        <f:selectItems value="#{itemController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                </p:panelGrid>
                <h:commandLink action="#{photosController.update}" value="#{bundle.EditPhotosSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditPhotosViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{photosController.prepareList}" value="#{bundle.EditPhotosShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditPhotosIndexLink}" action="/pages/index" immediate="true" />
                </p:panel>
             
        </ui:define>
    </ui:composition>

</html>
